<?php

namespace app\api\controller;
use app\common\lib\exception\ApiException;

class Test extends Common
{
    public function index()
    {
        return [
            'were',
            'sdff',
        ];
    }
    public function save()
    {
        $data = 1;
        if ($data['id'] !== 34) {
            throw new ApiException('你的数据不合法', 400);
        }

        return show(1, 'ok1', input('post.'), 201);
    }
}
